package com.gxa.ssm251.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data  //get set tostring
@AllArgsConstructor  //全参构造
@NoArgsConstructor   //无参构造
public class Cp implements Serializable {
//    private Integer id;
//    private String name;
//    private String desc;
//    private String img;
//    private String role;
//    private Date colletExpire;
//    private Date useExpire;
//    private boolean inUse;


    private Integer id;
    private String name;
    private String desc;
    private String img;
    private String role;
    // 如果存在时间日期类型的字段,也可以利用JSONField进行格式化处理
   /* @JSONField(format = "YYYY-MM-dd HH:mm:ss")
    private Date regDate;*/

//    @JSONField(format = "YYYY-MM-dd HH:mm:ss")
@JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date colletExpire;
//    @JSONField(format = "YYYY-MM-dd HH:mm:ss")
@JsonFormat(pattern = "YYYY-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date useExpire;
    private boolean inUse;
    private CpDetail detail;

}
